books %>%mutate(Author =as.factor(Author), Title =as.factor(Title), `Type of Ban`=as.factor(`Type of Ban`), State =as.factor(State), District =as.factor(District), `Date of Challenge/Removal`=as.factor(`Date of Challenge/Removal`), `Origin of Challenge`=as.factor(`Origin of Challenge`)) %>%select(Author, Title, `Type of Ban`, State, `Date of Challenge/Removal`, `Origin of Challenge`) %>%datatable(filter="top", options =list(pageLength =5, autoWidth =TRUE), rownames=FALSE)
Top 7 Most Banned Books
Show the code
#Add links to purchase the books -> to authors homepage? topbooks %>%select(image = image_url, Title, Author, numTimesBanned) %>%ungroup() %>%gt()%>%gt_img_rows(columns = image,img_source="local", height =150)%>%tab_header(title ="The Most Banned Books from July 2021 - June 2022") %>%cols_label(Title ="Book Title",image ="Book Cover",Author ="Author",numTimesBanned ="Total Number of Bans" )
Wickham, Hadley, Mara Averick, Jennifer Bryan, Winston Chang, Lucy D’Agostino McGowan, Romain François, Garrett Grolemund, et al. 2019. “Welcome to the tidyverse.”Journal of Open Source Software 4 (43): 1686. https://doi.org/10.21105/joss.01686.
Wickham, Hadley, Winston Chang, Lionel Henry, Thomas Lin Pedersen, Kohske Takahashi, Claus Wilke, Kara Woo, Hiroaki Yutani, and Dewey Dunnington. 2022. Ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics. https://CRAN.R-project.org/package=ggplot2.